-- GENERATED SPELL FOR [Rogue Voidwalker] --


function spell0_16974(pUnit, Event) --@Coalesce,Self--
pUnit:FullCastSpellOnTarget(34302,pUnit)
pUnit:RegisterEvent('Sorts_16974', 1500, 1)
end

function spell1_16974(pUnit, Event) --@De-Materialize,Self--
pUnit:FullCastSpellOnTarget(34842,pUnit)
pUnit:RegisterEvent('Sorts_16974', 1500, 1)
end

function spell2_16974(pUnit, Event) --@Shadowstrike,n/a--
pUnit:FullCastSpellOnTarget(33914,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16974', 544, 1)
end

function Sorts_16974(pUnit, Event)
local choix_sorts_16974 = math.random(0, 2)
if choix_sorts_16974 == 0 then
pUnit:RegisterEvent('spell0_16974', 1, 1)
end
if choix_sorts_16974 == 1 then
pUnit:RegisterEvent('spell1_16974', 1, 1)
end
if choix_sorts_16974 == 2 then
pUnit:RegisterEvent('spell2_16974', 1, 1)
end
end

function mob16974_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16974', math.random(1500, 3000), 1)
end

function mob16974_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16974_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16974_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16974, 1, 'mob16974_Action')
RegisterUnitEvent(16974, 2, 'mob16974_Leave')
RegisterUnitEvent(16974, 3, 'mob16974_Kill')
RegisterUnitEvent(16974, 4, 'mob16974_Die')
